package com.gitee.wsl.doc.prosemirror.model

import com.fleeksoft.ksoup.nodes.Element
import com.fleeksoft.ksoup.select.Selector


interface Platform {
    val name: String
}

//expect fun evaluateXpathNode(s: String, dom: Element): Element
//expect fun getPlatform(): Platform

fun evaluateXpathNode(s: String, dom: Element): Element{
    //return dom
    return Selector.selectFirst(s,root=dom) ?:dom
}

fun getPlatform(): Platform = object :Platform{
    override val name: String
        get() = com.gitee.wsl.platform.platform.current.toString()

}